package pom;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.testng.Assert;
import org.testng.Reporter;

public class SuccessLoginPage {
        private final WebDriver driver;
       
       
        public SuccessLoginPage(WebDriver driver)
        {
                 this.driver = driver;
                 Reporter.log("yeah! reporter --suncced log in");
                 
                // System.out.println("yeah!right Log in!!");
               
                 Assert.assertTrue(
                         driver.getPageSource().contains("Change Password"),
                         "Homepage not logged in"); 
               
                 //System.out.println("yeah!right Log in---one more time!!");
                //if (!driver.getPageSource().contains("Change Password")) {
                    //throw new IllegalStateException("Homepage not logged in.");
                }
        }



